<html>
<head>
<script src="../../../resources/js-test.js"></script>
</head>
<body>

<div name='name1' id='id1'/>
<p   name='name3' id='id2'/>
<div name='name2' id='id2'/>

<script>
description("Test using id as index of node list");

var elems = document.getElementsByTagName('div');

shouldBe('elems["id1"].getAttribute("name")', '"name1"');
shouldBe('elems["id2"].getAttribute("name")', '"name2"');
</script>
</body>
</html>
